﻿$.mockjaxSettings.responseTime = 10;

$.mockjax({
	url: "/remote/true",
	responseText: true
});

$.mockjax({
	url: "/remote/false",
	responseText: false
});

function noop(){ }
function returnTrue(){ return true; }
function returnFalse(){ return false; }

function returnTrueDelay(){
	return $.ajax({
		url: "/remote/true"
	});	
}

function returnFalseDelay(){
	return $.ajax({
		url: "/remote/false"
	});
}





module("test utility method");

asyncTest("returnTrueDelay", function(){
	expect(1);
	returnTrueDelay().success(function(response){ 
		equals(response, true); 
		start();
	});
});

asyncTest("returnFalseDelay", function(){
	expect(1);
	returnFalseDelay().success(function(response){ 
		equals(response, false); 
		start();
	});
});